package com.utils {

	public class LoadResponder {
		public var callback:Function;
		public var progress:Function;

		public function LoadResponder(completeFun:Function = null, progressFun:Function = null) {
			callback = completeFun;
			progress = progressFun;
		}

		public function lCallback():void {
			this.callback();
		}

		public function lProgress(_arg1:String, _arg2:int, _arg3:int, _arg4:int, _arg5:String):void {
			if (this.progress is Function) {
				switch (this.progress.length) {
					case 2:
						this.progress(_arg1, _arg2);
						return;
					case 3:
						this.progress(_arg1, _arg2, _arg3);
						return;
					case 4:
						this.progress(_arg1, _arg2, _arg3, _arg5);
						return;
					case 5:
						this.progress(_arg1, _arg2, _arg3, _arg4, _arg5);
						return;
				}
			}
		}

	}

}
